﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="InventoryListReport.aspx.cs" Inherits="UI_Report_InventoryListReport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>库存一览表</title>   
    <script src="../../js/common.js" type="text/javascript"></script> 
    <link href="../../css/admin.css" rel="stylesheet" type="text/css" />
    <link href="../../js/jquery.easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../js/jquery.easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery.easyui/jquery.min.js" type="text/javascript"></script>
    <script src="../../js/jquery.easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../../js/jquery.easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>

    <script type ="text/javascript" >
        $(function () {
            var _$stock = $("#stock");
            _$stock.datagrid({
                border: true,
                height: 650,
                width: 1100,
                title: '库存一览表...',
                remoteSort: false,
                nowrap: true,
                striped: false,
                //url: "../../TableHanders.aspx?act=q&tid=1023&type=0",
                pageSize: 50,
                sortName: 'ProductId',
                sortOrder: 'desc',
                loadMsg: "正在加载,请稍后...",
                frozenColumns: [[
	                { title: '库存编号', field: 'FStockID', width: 80, sortable: true },
                    { title: '物料代码', field: 'ProductId', width: 100, sortable: true }
				  ]],
                columns: [[
                    { title: '产品规格', field: 'ProductSpecification', width: 200, sortable: true },
	                { title: '仓库', field: 'FName', width: 100, sortable: true },
	                { title: '产品名称', field: 'ProductName', width: 150, sortable: true },
                    //{ title: '仓位', field: 'FNumber', width: 100, sortable: true },
                    { title: '库存数量', field: 'FQty', width: 100, sortable: true },
                    { title: '未发货数量', field: 'sQty', width: 100, sortable: true },
                    //{ title: '在售', field: 'Sales', width: 80, sortable: true },
                    {title: '成本', field: 'Cost', width: 80, sortable: true },
                    { title: '重量', field: 'Weight', width: 80, sortable: true }
				]],
                pagination: true,
                rownumbers: true,
                singleSelect: false,
                pageList: [10, 20,50,100],
                queryParams: {
                    "sales": "",
                    "pscation": ""
                }
            });

            $("#btnQuery").click(function () {
                if (!$("#divContent").form('validate'))
                    return;
                var pscation = $("#txtProductSpecification").val();
                var sales = $("#ddlSales").combobox('getValue');
                _$stock.datagrid({
                    url: "../../TableHanders.aspx?act=q&tid=1023&type=0",
                    queryParams: {
                        "sales":sales,
                        "pscation": pscation
                    }
                });
            });
        });
	</script>	
</head>
<body>
    <form id="form1" runat="server" style="width :1100px;">
      <div class="div_Title" >
            <span class="Body_Title">》》<%=this.Title %></span>
      </div>
      <div id="divContent" class="easyui-panel" title="请输入查询条件..." style="margin-bottom:5px;">
           <table >
                 <tr>                  
                    <td>产品规格:</td>
                    <td>
            	        <input id="txtProductSpecification" runat="server" style="width:200px;" />
                    </td>
                    <%--<td>是否在售:</td>--%>
                    <td>仓库:</td>
                    <td>
            	        <select  id="ddlSales" runat="server" class="easyui-combobox" style="width:140px;"></select>
                    </td>                                     
                    <td> 
                        <a id="btnQuery"  href ="#"  class="easyui-linkbutton" icon="icon-search" >Query</a></td>
                    <td>                   
                     <asp:LinkButton ID="btnExport" CssClass = "easyui-linkbutton" Text=" 导  出 " runat="server" onclick="btnExport_Click"></asp:LinkButton> </td>
                </tr>
             </table>
        </div>
        <table  id="stock" runat="server"></table>
    </form>
</body>
</html>